package iface

import (
	"property_api/internal/types"
	"time"
)

type (
	IResult interface {
		End() (*types.Response, error)
	}
	IErr interface {
		IResult
		ErrEd() (*types.PageRes, error)
	}
	ISuc interface {
		IResult
		PageEd() (*types.PageRes, error)
	}
)

type (
	ICheck interface {
		Check() bool
	}
	ICheckStr interface {
		ICheck
		CheckStr(string) ICheckStr
		IsEmpty(string) ICheckStr
		IsNotEmpty(string) ICheckStr
	}
)

type (
	IConvert interface {
		Convert(string) (string, error)
		UnConvert(string) string
	}
	ICodeValid interface {
		DefineRegexp(...string) ICodeValid
		CheckCode(string) ICodeValid
		GetParentCode(string) string
		Check() bool
	}
)

type (
	ITime interface {
		SetDateFormat(key, format string) IDate
		GetDateFormat(string) IDate
	}
	IDate interface {
		ToString(time.Time) string
		ToDate(string) *time.Time
	}
)
